<?php

$api = app('Dingo\Api\Routing\Router');

$api->version('v1', ['namespace' => 'App\Http\Controllers'], function ($api) {

    /**
     * |--------------------------------------------------------------
     * |  不需要验证的接口
     * |--------------------------------------------------------------
     */
    $api->group([
        'limit'   => config('api.rate_limits.access.limit'),
        'expires' => config('api.rate_limits.access.expires')
    ], function ($api) {
        $api->any('get_system_config', 'SystemConfigController@show'); //获取系统设置
        $api->any('login', 'AuthController@login'); //登录
        $api->any('register', 'AuthController@register'); //注册
        $api->any('attachment/download', 'AttachmentController@download'); //OSS下载
        $api->any('dossier_templates/download', 'DossierTemplateController@download'); //案卷模板下载
        $api->any('index/example_template', 'IndexController@exampleTemplate'); //数据导入模板
        $api->any('index/per_page_arr', 'IndexController@perPageArr'); //分页数组
        $api->any('companies/store', 'CompanyController@store');//添加公司 (注册页面尚未登录)
        $api->any('test', 'TestController@index');//测试
    });

    /**
     * |--------------------------------------------------------------
     * |  需要 token 验证的接口
     * |--------------------------------------------------------------
     */
    $api->group([
        'middleware' => ['api.auth'], //api.auth 是 config/api.php 里面的auth
        'limit'      => config('api.rate_limits.access.limit'),
        'expires'    => config('api.rate_limits.access.expires')
    ], function ($api) {

        $api->any('change_pwd', 'AuthController@changePwd'); //修改密码
        $api->any('logout', 'AuthController@logout'); //退出登录
        $api->post('attachment/upload', 'AttachmentController@upload'); //单个附件上传OSS
        $api->get('now_location', 'IndexController@nowLocation'); //获取当前位置
        $api->get('menus', 'RuleMenuController@leftMenus'); //菜单

        /**
         * 导出
         */
        $api->group(['prefix' => 'export'], function ($api) {
            $api->post('export_book_title', 'ExportController@exportBookTitle'); //导出案卷目录
            $api->post('export_book_catalog', 'ExportController@exportBookCatalog'); //导出卷内目录
            $api->post('export_full_index', 'ExportController@exportFullIndex'); //导出全引目录
            $api->post('export_appendix', 'ExportController@exportAppendix'); //导出备考表
            $api->post('export_cover', 'ExportController@exportCover'); //导出封面
            $api->post('export_box', 'ExportController@exportBox'); //导出盒子脊背
            $api->post('export_page_num', 'ExportController@exportPageNum'); //导出页码
            $api->post('exportBookCatalogInIt', 'ExportController@exportBookCatalogInIt'); //导出页码
        });

        /**
         * |--------------------------------------------------------------
         * |  档案管理
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'archive_manage'], function ($api) {
            $api->get('get_types', 'ArchiveManageController@getTypes'); //获取档案管理下面的类型
            $api->get('get_content', 'ArchiveManageController@getContent'); //获取某个内容
            $api->post('store', 'ArchiveManageController@store'); //获取档案管理下面的类型
            /**
             * 文书档案
             */
            $api->get('get_doc_archives', 'ArchiveManageController@getDocArchives'); //获取数据
            $api->get('get_projects', 'ArchiveManageController@getProjects'); //获取公司项目
            $api->get('get_years', 'ArchiveManageController@getYears'); //获取年份
            $api->get('get_agencies', 'ArchiveManageController@getAgencies'); //获取代理
            $api->get('get_store_periods', 'ArchiveManageController@getStorePeriods'); //保管期限
            $api->post('import_doc_archive', 'ArchiveManageController@importDocArchive'); //保管期限
            $api->post('clear_data', 'ArchiveManageController@clearData'); //清空数据
            $api->post('update', 'ArchiveManageController@update'); //清空数据
            $api->post('export', 'ArchiveManageController@export'); //导出数据
        });

        /**
         * 会计档案
         */
        $api->group(['prefix' => 'account_archive'], function ($api) {
            $api->post('import', 'AccountArchiveController@import'); //导入数据
            $api->get('get_list', 'AccountArchiveController@getList'); //获取数据
            $api->post('destroyMore', 'AccountArchiveController@destroyMore'); //软删除单个
            $api->post('add', 'AccountArchiveController@addData'); //保存数据
            $api->post('update_data', 'AccountArchiveController@updateData'); //更新数据
            $api->post('export', 'AccountArchiveController@export'); //导出数据
        });

        /**
         * 档案全引目录
         */
        $api->group(['prefix' => 'full_index'], function ($api) {
            $api->get('get_list', 'FullIndexController@getList'); //获取数据
            $api->post('update_status', 'FullIndexController@updateStatus'); //改变状态
            $api->post('create_url', 'FullIndexController@createUrl'); //生成下载地址
        });

        /**
         * 库房管理
         */
        $api->group(['prefix' => 'storeroom'], function ($api) {
            $api->post('import', 'StoreroomController@import'); //导入数据
            $api->get('get_list', 'StoreroomController@getList'); //获取数据
            $api->post('destroyMore', 'StoreroomController@destroyMore'); //软删除单个
            $api->post('add', 'StoreroomController@addData'); //保存数据
            $api->post('update_data', 'StoreroomController@updateData'); //更新数据
            $api->post('export', 'StoreroomController@export'); //导出数据
        });

        /**
         * 温湿度管理
         */
        $api->group(['prefix' => 'humidity'], function ($api) {
            $api->get('get_years', 'HumidityController@getYears'); //获取年
            $api->get('get_list', 'HumidityController@getList'); //获取数据
            $api->post('add', 'HumidityController@addData'); //保存数据
            $api->post('update_data', 'HumidityController@updateData'); //更新数据
            $api->post('import', 'HumidityController@import'); //导入数据
            $api->post('export', 'HumidityController@export'); //导出数据
            $api->post('destroyMore', 'HumidityController@destroyMore'); //软删除单个
        });

        /**
         * 变更台账
         */
        $api->group(['prefix' => 'ledger_change'], function ($api) {
            $api->post('import', 'LedgerChangeController@import'); //导入数据
            $api->get('get_list', 'LedgerChangeController@getList'); //获取数据
            $api->post('destroyMore', 'LedgerChangeController@destroyMore'); //软删除单个
            $api->post('add', 'LedgerChangeController@addData'); //保存数据
            $api->post('update_data', 'LedgerChangeController@updateData'); //更新数据
            $api->post('export', 'LedgerChangeController@export'); //导出数据
        });

        /**
         * 招投标台账
         */
        $api->group(['prefix' => 'ledger_tender'], function ($api) {
            $api->post('import', 'LedgerTenderController@import'); //导入数据
            $api->get('get_list', 'LedgerTenderController@getList'); //获取数据
            $api->post('destroyMore', 'LedgerTenderController@destroyMore'); //软删除单个
            $api->post('add', 'LedgerTenderController@addData'); //保存数据
            $api->post('update_data', 'LedgerTenderController@updateData'); //更新数据
            $api->post('export', 'LedgerTenderController@export'); //导出数据
        });

        /**
         * 合同台账
         */
        $api->group(['prefix' => 'ledger_contract'], function ($api) {
            $api->post('import', 'LedgerContractController@import'); //导入数据
            $api->get('get_list', 'LedgerContractController@getList'); //获取数据
            $api->post('destroyMore', 'LedgerContractController@destroyMore'); //软删除单个
            $api->post('add', 'LedgerContractController@addData'); //保存数据
            $api->post('update_data', 'LedgerContractController@updateData'); //更新数据
            $api->post('export', 'LedgerContractController@export'); //导出数据
        });

        /**
         * 物质设备台账
         */
        $api->group(['prefix' => 'ledger_equipment'], function ($api) {
            $api->post('import', 'LedgerEquipmentController@import'); //导入数据
            $api->get('get_list', 'LedgerEquipmentController@getList'); //获取数据
            $api->post('destroyMore', 'LedgerEquipmentController@destroyMore'); //软删除单个
            $api->post('add', 'LedgerEquipmentController@addData'); //保存数据
            $api->post('update_data', 'LedgerEquipmentController@updateData'); //更新数据
            $api->post('export', 'LedgerEquipmentController@export'); //导出数据
        });

        /**
         * |--------------------------------------------------------------
         * |  档案管理卷
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'archive_manage_volume'], function ($api) {
            $api->get('get_part_company_list', 'ArchiveManageVolumeController@getPartCompanyList'); //获取参见单位
            $api->post('upload_file', 'ArchiveManageVolumeController@uploadFile'); //上传PDF
            $api->post('import', 'ArchiveManageVolumeController@import'); //导入数据
            $api->get('get_specification_list', 'ArchiveManageVolumeController@getSpecificationList'); //获取数据
            $api->post('destroyMore', 'ArchiveManageVolumeController@destroyMore'); //软删除单个
            $api->post('add', 'ArchiveManageVolumeController@addData'); //保存数据
            $api->post('update_data', 'ArchiveManageVolumeController@updateData'); //更新数据
            $api->post('export', 'ArchiveManageVolumeController@export'); //导出数据
        });

        /**
         * |--------------------------------------------------------------
         * |  首页
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'home'], function ($api) {
            $api->get('get_lng_lat', 'HomeController@getMapLngAndLat'); //获取经纬度
            $api->get('get_projects', 'HomeController@getProjects'); //获取项目
            $api->get('getSectionArchives', 'HomeController@getSectionArchives'); //获取标段案卷
            $api->get('getMajorCodeArchives', 'HomeController@getMajorCodeArchives'); //获取专业案卷
            $api->get('company_data', 'HomeController@companyData'); //公司数据统计
            $api->get('get_statistic_detail', 'HomeController@getStatisticDetail'); //项目数据统计
            $api->get('get_refresh_time', 'HomeController@getRefreshTime'); //获取数据的刷新时间
        });

        /**
         * |--------------------------------------------------------------
         * |  用户
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'users'], function ($api) {
            $api->get('index', 'UserController@index'); //用户列表
            $api->get('show', 'UserController@show'); //获取一条信息
            $api->get('search_users', 'UserController@searchUsers'); //搜索用户
            $api->post('import', 'UserController@import'); //用户数据导入
            $api->get('export', 'UserController@export'); //用户数据导出
            $api->post('set_company_id', 'UserController@setCompanyId'); //设置选中的公司
            $api->get('companies', 'UserController@companies');//所在的公司列表
            $api->get('user_details', 'UserController@userDetails'); //用户的树状关系
            $api->post('add', 'UserController@store'); //新增
            $api->post('update', 'UserController@update'); //更新
            $api->get('get_user_by_phone', 'UserController@getUserByPhone'); //用手机号查找用户
            $api->get('action_logs', 'UserController@actionLogs'); //操作记录
            $api->post('transfer_account', 'UserController@transferAccount'); //转让账号
            $api->get('get_project_list', 'UserController@getProjectList'); //获取项目列表
            $api->get('recycle', 'UserController@recycle'); //回收站
            $api->post('destroyMore', 'UserController@destroyMore'); //软删除批量
            $api->post('retrieveMore', 'UserController@retrieveMore'); //恢复批量
            $api->post('deleteMore', 'UserController@deleteMore'); //永久删除批量
            $api->post('resetSystemUsersPassword', 'UserController@resetSystemUsersPassword'); //批量重置用户密码
        });

        /**
         * |--------------------------------------------------------------
         * |  角色
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'roles'], function ($api) {
            $api->post('store', 'RoleController@store'); //新增
            $api->get('index', 'RoleController@index'); //列表
            $api->get('show', 'RoleController@show'); //获取一条信息
            $api->post('update', 'RoleController@update'); //修改
            $api->post('change_status', 'RoleController@changeStatus'); //禁用启用状态

            $api->get('recycle', 'RoleController@recycle'); //回收站列表
            $api->post('destroyMore', 'RoleController@destroyMore'); //软删除批量
            $api->post('retrieveMore', 'RoleController@retrieveMore'); //恢复批量
            $api->post('deleteMore', 'RoleController@deleteMore'); //永久删除批量
        });

        /**
         * |--------------------------------------------------------------
         * |  组织
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'organized'], function ($api) {
            $api->get('index', 'OrganizeController@index'); //组织架构
            $api->post('del_node', 'OrganizeController@delNode'); //删除节点数据
            $api->get('users', 'OrganizeController@users'); //组织架构用户
            $api->post('user_import', 'OrganizeController@userImport'); //用户导入
            $api->post('del_user', 'OrganizeController@delUser'); //删除用户
            $api->post('edit_title', 'OrganizeController@editTitle'); //编辑标题
            $api->post('add_one_user', 'OrganizeController@addOneUser'); //添加单个用户
            $api->post('change_user_status', 'OrganizeController@changeUserStatus'); //禁用用户
        });

        /**
         * |--------------------------------------------------------------
         * |  公司
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'companies'], function ($api) {
            $api->get('index', 'CompanyController@index');//公司列表
            $api->get('show', 'CompanyController@show');//查询单个信息
            $api->get('user_roles', 'CompanyController@userRoles'); //公司人员权限查询
            $api->get('users', 'CompanyController@users'); //查看公司下的用户
            $api->get('departments', 'CompanyController@departments'); //指定公司下的部门
            $api->post('add', 'CompanyController@store');//新增数据
            $api->post('update', 'CompanyController@update');//更新数据
            $api->post('auth', 'CompanyController@auth'); //公司人员授权
            $api->post('review', 'CompanyController@review'); //审核公司
            $api->post('destroyMore', 'CompanyController@destroyMore'); //软删除批量
        });

        /**
         * |--------------------------------------------------------------
         * |  部门
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'departments'], function ($api) {
            $api->get('index', 'DepartmentController@index'); //获取列表
            $api->get('show', 'DepartmentController@show'); //查询单个数据
            $api->get('users', 'DepartmentController@users'); //获取部门用户
            $api->post('store', 'DepartmentController@store'); //保存部门
            $api->post('recycle', 'DepartmentController@recycle'); //回收站
            $api->post('destroy', 'DepartmentController@destroy'); //软删除单个
            $api->post('destroyMore', 'DepartmentController@destroyMore'); //软删除批量
            $api->post('delete', 'DepartmentController@delete'); //永久删除单个
            $api->post('deleteMore', 'DepartmentController@deleteMore'); //永久删除批量
            $api->post('retrieve', 'DepartmentController@retrieve'); //恢复单个
            $api->post('retrieveMore', 'DepartmentController@retrieveMore'); //恢复批量
        });

        /**
         * |--------------------------------------------------------------
         * |  项目
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'projects'], function ($api) {
            $api->get('index', 'ProjectController@index'); //获取列表
            $api->get('show', 'ProjectController@show'); //查询单个数据
            $api->post('store', 'ProjectController@store'); //保存
            $api->post('export_book_titles', 'ProjectController@exportBookTitles'); //导出项目或者参见单位下的全部案卷
            $api->post('relate_combination', 'ProjectController@relateCombination'); //项目匹配案卷组合
            $api->post('set_classify_template_id', 'ProjectController@setClassifyTemplateId'); //匹配分类模板
            $api->post('destroyMore', 'ProjectController@destroyMore'); //批量软删除
            $api->post('upload_file', 'ProjectController@uploadFile'); //上传专项检查意见
        });

        /**
         * |--------------------------------------------------------------
         * |  分类目录
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'classifies'], function ($api) {
            $api->post('get_classify_chars', 'ClassifyController@getChars'); //获取添加单位工程用的元素
            $api->get('index', 'ClassifyController@index'); //列表
            $api->post('store', 'ClassifyController@store'); //保存数据
            $api->get('tree_classifies', 'ClassifyController@treeClassifies'); //带属性结构的分类目录
            $api->post('match_classify_to_pt', 'ClassifyController@setPartCompanyType');//给参建单位匹配分类
            $api->post('destroy', 'ClassifyController@destroy'); //软删除单个
            $api->post('retrieve', 'ClassifyController@retrieve'); //恢复单个
            $api->get('recycle', 'ClassifyController@recycle'); //回收站列表
        });

        /**
         * |--------------------------------------------------------------
         * |  参建单位模块
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'part_companies'], function ($api) {
            $api->get('index', 'PartCompanyController@index'); //列表
            $api->post('store', 'PartCompanyController@store'); //新增或编辑
            $api->get('show', 'PartCompanyController@show'); //获取一条信息
            $api->get('get_construct_units', 'PartCompanyController@getConstructUnits'); //获取项目施工单位
            $api->post('match_construct_unit', 'PartCompanyController@matchConstructUnit'); //匹配施工单位
            $api->get('get_list', 'PartCompanyController@getList'); //检索阶段参建单位
            $api->post('refresh_data', 'PartCompanyController@refreshData'); //刷新数据

            $api->get('recycle', 'PartCompanyController@recycle'); //回收站列表
            $api->post('destroy', 'PartCompanyController@destroy'); //软删除单个
            $api->post('destroyMore', 'PartCompanyController@destroyMore'); //软删除批量
            $api->post('delete', 'PartCompanyController@delete'); //永久删除单个
            $api->post('deleteMore', 'PartCompanyController@deleteMore'); //永久删除批量
            $api->post('retrieve', 'PartCompanyController@retrieve'); //恢复单个
            $api->post('retrieveMore', 'PartCompanyController@retrieveMore'); //恢复批量
        });

        /**
         * |--------------------------------------------------------------
         * |  参建单位->项目分类
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'project_classifies'], function ($api) {
            $api->get('tree_list', 'ProjectClassifyController@treeList'); //树形图
            $api->post('store', 'ProjectClassifyController@store'); //新增
            $api->post('update', 'ProjectClassifyController@update'); //编辑
            $api->get('classifies_info', 'ProjectClassifyController@classifiesInfo'); //获取信息
            $api->post('import', 'ProjectClassifyController@import'); //导入单位工程一览表数据
            $api->post('destroy', 'ProjectClassifyController@destroy'); //软删除单个
        });

        /**
         * |--------------------------------------------------------------
         * |  分类目录模板
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'classify_templates'], function ($api) {
            $api->get('index', 'ClassifyTemplateController@index'); //数据列表
            $api->post('store', 'ClassifyTemplateController@store'); //保存数据
            $api->get('recycle', 'ClassifyTemplateController@recycle'); //回收站列表
            $api->post('destroyMore', 'ClassifyTemplateController@destroyMore'); //软删除单个
            $api->post('retrieve', 'ClassifyTemplateController@retrieve'); //恢复单个
        });

        /**
         * |--------------------------------------------------------------
         * |  案卷构成模板
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'dossier_templates'], function ($api) {
            $api->get('index', 'DossierTemplateController@index'); //数据列表
            $api->post('store', 'DossierTemplateController@store'); //添加
            $api->get('show', 'DossierTemplateController@show'); //获取一条记录
            $api->post('update', 'DossierTemplateController@update'); //修改
            $api->get('recycle', 'DossierTemplateController@recycle'); //回收站列表
            $api->post('destroyMore', 'DossierTemplateController@destroyMore'); //软删除批量
            $api->post('retrieveMore', 'DossierTemplateController@retrieveMore'); //恢复批量
        });

        /**
         * |--------------------------------------------------------------
         * |  案卷模板组合
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'dossier_combinations'], function ($api) {
            $api->get('index', 'DossierCombinationController@index'); //获取列表
            $api->post('store', 'DossierCombinationController@store'); //添加
            $api->get('get_templates', 'DossierCombinationController@getTemplates'); //修改
            $api->get('recycle', 'DossierCombinationController@recycle'); //回收站列表
            $api->post('destroy', 'DossierCombinationController@destroy'); //软删除单个
            $api->post('retrieve', 'DossierCombinationController@retrieve'); //恢复单个
        });

        /**
         * |--------------------------------------------------------------
         * |  案卷目录
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'book_titles'], function ($api) {
            $api->get('index', 'BookTitleController@index'); //获取列表
            $api->post('store', 'BookTitleController@store'); //添加
            $api->post('update', 'BookTitleController@update'); //更新
            $api->get('show', 'BookTitleController@show'); //获取一条数据
            $api->post('check', 'BookTitleController@check'); //检查
            $api->post('batch_replace', 'BookTitleController@batchReplace'); //批量替换
            $api->post('insert_one_row', 'BookTitleController@store'); //插入一行
            $api->post('problem_mark', 'BookTitleController@problemMark'); //问题标记
            $api->post('problem_resolved', 'BookTitleController@problemResolved'); //问题解决
            $api->get('cabin_mark_notice', 'BookTitleController@cabinMarkNotice'); //柜号标记提示
            $api->post('blueprint_mark', 'BookTitleController@blueprintMark'); //蓝图标记
            $api->post('cabin_mark', 'BookTitleController@cabinMark'); //柜号标记
            $api->post('batch_import_pdf_in_title', 'BookTitleController@batchImportPdfInTitle'); //在案卷页面批量导入PDF
            $api->post('import', 'BookTitleController@import'); //案卷导入
            $api->post('import', 'BookTitleController@import'); //导入
            $api->post('export', 'BookTitleController@export'); //导出
            $api->post('export_by_project', 'BookTitleController@exportByProject'); //导出项目全部案卷
            $api->post('zero_fill', 'BookTitleController@zeroFill'); //档案号后缀需要补充几个前导0
            $api->post('auto_fill', 'BookTitleMergeController@autoFill'); //自动补齐案卷
            $api->get('recycle', 'BookTitleController@recycle'); //回收站列表
            $api->post('destroyMore', 'BookTitleController@destroyMore'); //软删除批量
            $api->post('clear_data', 'BookTitleController@clearData'); //清空案卷
            $api->get('get_min_and_max_serial', 'BookTitleController@getMinAndMaxSerial'); //点击单位工程时，获取对应的案卷的最大和最小序号，导出卷内等用
        });

        /**
         * |--------------------------------------------------------------
         * |  合并案卷
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'merges'], function ($api) {
            $api->get('get_part_companies', 'BookTitleMergeController@getPartCompanies'); //获取待合并的参见单位
            $api->post('create_relation', 'BookTitleMergeController@createRelation'); //创建关联
            $api->get('get_wait_merges', 'BookTitleMergeController@getWaitMerges'); //获取待合并的案卷
            $api->post('execute', 'BookTitleMergeController@execute'); //执行合并案卷
        });

        /**
         * |--------------------------------------------------------------
         * |  卷内目录
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'book_catalogs'], function ($api) {
            $api->get('index', 'BookCatalogController@index'); //获取列表
            $api->post('store', 'BookCatalogController@store'); //添加
            $api->post('update', 'BookCatalogController@update'); //更新一条数据
            $api->post('batch_replace', 'BookCatalogController@batchReplace'); //卷内批量替换
            $api->post('problem_mark', 'BookCatalogController@problemMark'); //问题标记
            $api->post('problem_resolved', 'BookCatalogController@problemResolved'); //问题解决
            $api->post('is_pic', 'BookCatalogController@isPic'); //是否图纸
            $api->post('check', 'BookCatalogController@check'); //检查
            $api->post('import', 'BookCatalogController@import'); //导入
//            $api->post('export', 'BookCatalogController@export'); //导出数据
            $api->post('export3', 'BookCatalogController@export3'); //导出数据（卷内导出一个卷内数据）
//            $api->post('export_page_num', 'BookCatalogController@exportPageNum'); //导出页码
            $api->post('add_pdfs', 'BookCatalogController@addPdf'); //上传PDF文件
            $api->get('show_pdfs', 'BookCatalogController@showPdfs'); //PDF数据列表
            $api->get('quick_switch_pdf', 'BookCatalogController@quickSwitchPdf'); //左右切换PDF文件
            $api->post('del_pdf', 'BookCatalogController@delPdf'); //删除PDF文件
            $api->get('recycle', 'BookCatalogController@recycle'); //回收站列表
            $api->post('destroyMore', 'BookCatalogController@destroyMore'); //软删除批量
            $api->post('deleteMore', 'BookCatalogController@deleteMore'); //永久删除批量
//            $api->post('export_fi', 'BookCatalogController@exportFullIndex'); //导出全引
            $api->post('sort_again', 'BookCatalogController@sortAgain'); //重新排序

        });

        /**
         * |--------------------------------------------------------------
         * |  下载任务
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'download_job'], function ($api) {
            $api->get('index', 'DownloadJobController@index'); //获取列表
            $api->post('re_download', 'DownloadJobController@reDownload'); //重新下载
        });

        /**
         * |--------------------------------------------------------------
         * |  【检索阶段】
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'search_stage'], function ($api) {
            $api->get('get_borrow_logs', 'SearchStageController@borrowLogs'); //获取借阅记录
            $api->post('update_status', 'SearchStageController@updateStatus'); //改变借阅状态
            $api->get('get_project_classify', 'SearchStageController@getProjectClassify'); //获取检索阶段项目分类
            $api->get('part_company/get_book_titles', 'SearchStageController@getPartCompanyBookTitles'); //按照参见单位获取案卷目录
            $api->get('project_classify/get_book_titles', 'SearchStageController@getProjectClassifyBookTitles'); //按照项目分类获取案卷目录
            $api->get('get_book_catalogs', 'SearchStageController@getBookCatalogs'); //获取卷内
            /**
             * 按照参见单位
             */
            $api->post('part_company/export_bt', 'SearchStageController@partCompanyExportBookTitles'); //获取案卷
            $api->post('part_company/export_ct', 'SearchStageController@partCompanyExportBookCatalogs'); //获取卷内
            $api->post('part_company/export_fi', 'SearchStageController@partCompanyExportFullIndexes'); //获取全引
            /**
             * 按照分类目录
             */
            $api->post('project_classify/export_bt', 'SearchStageController@projectClassifyExportBookTitles'); //获取案卷
            $api->post('project_classify/export_ct', 'SearchStageController@projectClassifyExportBookCatalogs'); //获取卷内
            $api->post('project_classify/export_fi', 'SearchStageController@projectClassifyExportFullIndexes'); //获取全引
            /**
             * 在项目中查找
             */
            $api->get('project_search', 'SearchStageController@projectSearch'); //智能检索(在项目中查找关键字)
            $api->get('get_history_search', 'SearchStageController@getHistorySearch'); //获取检索记录
            $api->post('clear_history_search', 'SearchStageController@clearHistorySearch'); //清除检索记录
        });

        /**
         * |--------------------------------------------------------------
         * |  审批
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'approval'], function ($api) {

            $api->get('get_tree_users', 'ApprovalController@getTreeUsers'); //获取待选配置用户
            $api->post('config', 'ApprovalController@config'); //审批配置
            $api->get('wait_audit_classifies', 'ApprovalController@waitAuditClassifies'); //获取总分类
            $api->post('del_rule', 'ApprovalController@delRule'); //删除指定审批类型
            /**
             * 下面是【案卷审批】相关
             */
            $api->post('submit_book_titles', 'ApprovalController@submitBookTitleApproval'); //提交案卷审批
            $api->get('approval_book_titles', 'ApprovalController@getApprovalBookTitles'); //案卷的审批数据
            $api->get('book_titles', 'ApprovalController@getBookTitles'); //案卷数据
            $api->get('book_catalogs', 'ApprovalController@getBookCatalogs'); //卷内数据
            $api->post('book_title_approval_action', 'ApprovalController@bookTitleApprovalAction'); //案卷审批操作
            /**
             * 下面是【借阅审批】相关
             */
            $api->post('submit_borrows', 'ApprovalController@submitBorrows'); //提交审批
            $api->get('get_borrows_data', 'ApprovalController@getBorrowData'); //审批数据
            $api->get('borrow_book_titles', 'ApprovalController@getBorrowBookTitles'); //借阅数据
            $api->post('borrow_approval_action', 'ApprovalController@borrowApprovalAction'); //审批操作
        });


        /**
         * |--------------------------------------------------------------
         * | 系统配置
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'system_config'], function ($api) {
            $api->any('update', 'SystemConfigController@update'); //保存系统设置
        });

        /**
         * |--------------------------------------------------------------
         * | 消息
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'message'], function ($api) {
            $api->get('no_read_count', 'MessageController@noReadCount'); //获取未读消息数
            $api->get('index', 'MessageController@index'); //获取消息
            $api->post('set_had_read', 'MessageController@setHadRead'); //标记为已读
        });

        /**
         * |--------------------------------------------------------------
         * | 照片档案分类
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'photo_classifies'], function ($api) {
            $api->post('store', 'PhotoClassifyController@store'); //添加
            $api->get('show', 'PhotoClassifyController@show'); //获取一条信息
            $api->post('update', 'PhotoClassifyController@update'); //更新
            $api->get('unit_project_tree', 'PhotoClassifyController@getList'); //获取分类
            $api->post('destroy', 'PhotoClassifyController@destroy'); //删除分类
        });

        /**
         * |--------------------------------------------------------------
         * | 照片档案
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'photo_archives'], function ($api) {
            $api->get('index', 'PhotoArchivesController@index'); //获取列表
            $api->get('show', 'PhotoArchivesController@show'); //获取一条信息
            $api->post('store', 'PhotoArchivesController@store'); //保存数据
            $api->post('import', 'PhotoArchivesController@import'); //导入照片案卷
            $api->post('problem_mark', 'PhotoArchivesController@problemMark'); //问题标记
            $api->post('batch_replace', 'PhotoArchivesController@batchReplace'); //批量替换
            $api->post('problem_resolved', 'PhotoArchivesController@problemResolved'); //问题解决
            $api->post('check', 'PhotoArchivesController@check'); //检查案卷
            $api->post('destroyMore', 'PhotoArchivesController@destroyMore'); //删除照片档案
            $api->post('batch_import_photo', 'PhotoArchivesController@batchImportPhoto'); //批量导入照片
        });

        /**
         * |--------------------------------------------------------------
         * | 照片档案卷内目录
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'photo_catalogs'], function ($api) {
            $api->post('import', 'PhotoCatalogController@import'); //导入
            $api->post('export', 'PhotoCatalogController@export'); //导出
            $api->get('index', 'PhotoCatalogController@index'); //获取列表
            $api->get('show', 'PhotoCatalogController@show'); //获取一条信息
            $api->post('store', 'PhotoCatalogController@store'); //添加或编辑
            $api->post('check', 'PhotoCatalogController@check'); //检查卷内
            $api->post('add_photo', 'PhotoCatalogController@addPhoto'); //上传照片
            $api->get('show_photos', 'PhotoCatalogController@showPhotos'); //照片列表
            $api->post('del_photo', 'PhotoCatalogController@delPhoto'); //照片列表删除照片
            $api->post('problem_resolved', 'PhotoCatalogController@problemResolved'); //问题解决
            $api->post('destroyMore', 'PhotoCatalogController@destroyMore'); //删除
        });

        /**
         * |--------------------------------------------------------------
         * | 帮助文档
         * |--------------------------------------------------------------
         */
        $api->group(['prefix' => 'help_doc'], function ($api) {
            $api->get('get_title_tree', 'HelpDocController@getTitleTree'); //获取树状标题
            $api->post('save_title', 'HelpDocController@saveTitle'); //获取树状标题
            $api->post('del_node', 'HelpDocController@delNode'); //删除节点
            $api->post('save_content', 'HelpDocController@saveContent'); //保存文档内容
            $api->get('get_content', 'HelpDocController@getContent'); //获取文档内容
        });


    });

});
